import {getStorage, setStorage} from 'hcg-storage';

let specialList = getStorage('specialList') || [];
export default {
	state: specialList,
	actions: {
		setSpecialList({commit}, specialData) {
			commit('setSpecialList', specialData)
		}
	},
	mutations: {
		setSpecialList(state, specialList) {
			state.splice(0);
			for (let item of specialList) {
				state.push(item);
			}
			setStorage('specialList', state);
		}
	}
}
